package server.handler.userHandler;

import common.EnvelopeMessage;
import server.handler.SimpleHandler;
import server.session.Session;

public class HeartBeatHandler implements SimpleHandler {
    @Override
    public void handle(EnvelopeMessage msg, Session session) {
        if (session.getClientId() == null) {
            System.out.println("⚠️ 未登录客户端发来心跳，忽略");
            return;
        }
        System.out.println("心跳检测"+session.getClientId()+"，心在跳");
        session.updateLastActive();
    }
}
